import re
text = "The price is $998.99 and 123456 is a number."
pattern = r'\$?\d+\.?\d*'
matches = re.findall(pattern,text)
print(matches)